﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    /*
        var monday = DateTime.Now.GetThisMonday();
     */

    public static partial class DateTimeExtensions
    {
        public static DateTime GetThisMonday(this DateTime dt)
        {
           var today = DateTime.Now;
           return new GregorianCalendar().AddDays(today, -((int)today.DayOfWeek) + 1);
        }
    }
}
